/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jprojetocloseup;

/**
 *
 * @author Rodrigo Toma
 */

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;

import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;



public class LineSelectionTableCellRenderer 
	extends DefaultTableCellRenderer 
{
public int teste;
	@Override
	public Component getTableCellRendererComponent(
		JTable table,
		Object value,
		boolean isSelected,
		boolean hasFocus,
		int row,
		int column )
	{
		Component result = super.getTableCellRendererComponent(
			table,
			value,
			isSelected,
			hasFocus,
			row,
			column
		);
		String tt = (String) table.getModel().getValueAt(row, 2);
		if(tt.equals("N") ) {
			result.setFont(new Font("arial", Font.BOLD, 12));
			result.setForeground(Color.red);
			
		} else {
                    	result.setForeground(Color.black);
                        
                        
                }
                       // else if (!isSelected){
//                    result.setFont(new Font("arial", Font.BOLD, 12));
//		    result.setForeground(Color.BLACK);
//		    
//                }
		return result;
	}
	
}
